home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / DriverSupport.p < prev    next >
Text File  |  1996-05-01  |  5KB  |  137 lines

  1. {
  2.      File:        DriverSupport.p
  3.  
  4.      Contains:    Driver Support Interfaces.
  5.  
  6.      Version:    Technology:    Sustem 7.5 and 8
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT DriverSupport;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __DRIVERSUPPORT__}
  28. {$SETC __DRIVERSUPPORT__ := 1}
  29.  
  30. {$I+}
  31. {$SETC DriverSupportIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __CONDITIONALMACROS__}
  35. {$I ConditionalMacros.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __TYPES__}
  38. {$I Types.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __KERNEL__}
  41. {$I Kernel.p}
  42. {$ENDC}
  43. {$IFC FOR_SYSTEM8_PREEMPTIVE }
  44. {$IFC UNDEFINED __TIMING__}
  45. {$I Timing.p}
  46. {$ENDC}
  47. {$ENDC}
  48. {$IFC UNDEFINED __DEVICES__}
  49. {$I Devices.p}
  50. {$ENDC}
  51. {$IFC UNDEFINED __OSUTILS__}
  52. {$I OSUtils.p}
  53. {$ENDC}
  54. {$IFC UNDEFINED __MACHINEEXCEPTIONS__}
  55. {$I MachineExceptions.p}
  56. {$ENDC}
  57.  
  58. {$PUSH}
  59. {$ALIGN MAC68K}
  60. {$LibExport+}
  61.  
  62.  
  63. TYPE
  64.     DeviceLogicalAddressPtr                = ^LogicalAddress;
  65. {$IFC FOR_SYSTEM7_ONLY }
  66.  
  67. CONST
  68.     durationMicrosecond            = -1;                            {  Microseconds are negative }
  69.     durationMillisecond            = 1;                            {  Milliseconds are positive }
  70.     durationSecond                = 1000;                            {  1000 * durationMillisecond }
  71.     durationMinute                = 60000;                        {  60 * durationSecond, }
  72.     durationHour                = 3600000;                        {  60 * durationMinute, }
  73.     durationDay                    = 86400000;                        {  24 * durationHour, }
  74.     durationNoWait                = 0;                            {  don't block }
  75.     durationForever                = $7FFFFFFF;                    {  no time limit }
  76.  
  77.     kCurrentAddressSpaceID        = -1;
  78.  
  79. {$ENDC}
  80.  
  81. CONST
  82.     k8BitAccess                    = 0;                            {  access as 8 bit }
  83.     k16BitAccess                = 1;                            {  access as 16 bit }
  84.     k32BitAccess                = 2;                            {  access as 32 bit }
  85.  
  86. {$IFC FOR_SYSTEM7_ONLY }
  87.  
  88. TYPE
  89.     Nanoseconds                            = UnsignedWide;
  90.     NanosecondsPtr                         = ^Nanoseconds;
  91. {$ENDC}
  92. PROCEDURE BlockCopy(srcPtr: UNIV Ptr; destPtr: UNIV Ptr; byteCount: Size); C;
  93. FUNCTION PoolAllocateResident(byteSize: ByteCount; clear: BOOLEAN): LogicalAddress; C;
  94. FUNCTION PoolDeallocate(address: LogicalAddress): OSStatus; C;
  95. FUNCTION GetLogicalPageSize: ByteCount; C;
  96. FUNCTION GetDataCacheLineSize: ByteCount; C;
  97. FUNCTION FlushProcessorCache(spaceID: AddressSpaceID; base: LogicalAddress; length: ByteCount): OSStatus; C;
  98. PROCEDURE SynchronizeIO; C;
  99. FUNCTION MemAllocatePhysicallyContiguous(byteSize: ByteCount; clear: BOOLEAN): LogicalAddress; C;
  100. FUNCTION MemDeallocatePhysicallyContiguous(address: LogicalAddress): OSStatus; C;
  101. {$IFC FOR_SYSTEM7_ONLY }
  102. FUNCTION UpTime: AbsoluteTime; C;
  103. PROCEDURE GetTimeBaseInfo(VAR minAbsoluteTimeDelta: UInt32; VAR theAbsoluteTimeToNanosecondNumerator: UInt32; VAR theAbsoluteTimeToNanosecondDenominator: UInt32; VAR theProcessorToAbsoluteTimeNumerator: UInt32; VAR theProcessorToAbsoluteTimeDenominator: UInt32); C;
  104. FUNCTION AbsoluteToNanoseconds(absoluteTime: AbsoluteTime): Nanoseconds; C;
  105. FUNCTION AbsoluteToDuration(absoluteTime: AbsoluteTime): Duration; C;
  106. FUNCTION NanosecondsToAbsolute(nanoseconds: Nanoseconds): AbsoluteTime; C;
  107. FUNCTION DurationToAbsolute(duration: Duration): AbsoluteTime; C;
  108. FUNCTION AddAbsoluteToAbsolute(absoluteTime1: AbsoluteTime; absoluteTime2: AbsoluteTime): AbsoluteTime; C;
  109. FUNCTION SubAbsoluteFromAbsolute(leftAbsoluteTime: AbsoluteTime; rightAbsoluteTime: AbsoluteTime): AbsoluteTime; C;
  110. FUNCTION AddNanosecondsToAbsolute(nanoseconds: Nanoseconds; absoluteTime: AbsoluteTime): AbsoluteTime; C;
  111. FUNCTION AddDurationToAbsolute(duration: Duration; absoluteTime: AbsoluteTime): AbsoluteTime; C;
  112. FUNCTION SubNanosecondsFromAbsolute(nanoseconds: Nanoseconds; absoluteTime: AbsoluteTime): AbsoluteTime; C;
  113. FUNCTION SubDurationFromAbsolute(duration: Duration; absoluteTime: AbsoluteTime): AbsoluteTime; C;
  114. FUNCTION AbsoluteDeltaToNanoseconds(leftAbsoluteTime: AbsoluteTime; rightAbsoluteTime: AbsoluteTime): Nanoseconds; C;
  115. FUNCTION AbsoluteDeltaToDuration(leftAbsoluteTime: AbsoluteTime; rightAbsoluteTime: AbsoluteTime): Duration; C;
  116. FUNCTION DurationToNanoseconds(theDuration: Duration): Nanoseconds; C;
  117. FUNCTION NanosecondsToDuration(theNanoseconds: Nanoseconds): Duration; C;
  118. {$ENDC}
  119. FUNCTION PBQueueInit(qHeader: QHdrPtr): OSErr; C;
  120. FUNCTION PBQueueCreate(VAR qHeader: QHdrPtr): OSErr; C;
  121. FUNCTION PBQueueDelete(qHeader: QHdrPtr): OSErr; C;
  122. PROCEDURE PBEnqueue(qElement: QElemPtr; qHeader: QHdrPtr); C;
  123. FUNCTION PBEnqueueLast(qElement: QElemPtr; qHeader: QHdrPtr): OSErr; C;
  124. FUNCTION PBDequeue(qElement: QElemPtr; qHeader: QHdrPtr): OSErr; C;
  125. FUNCTION PBDequeueFirst(qHeader: QHdrPtr; VAR theFirstqElem: QElemPtr): OSErr; C;
  126. FUNCTION PBDequeueLast(qHeader: QHdrPtr; VAR theLastqElem: QElemPtr): OSErr; C;
  127. {$ALIGN RESET}
  128. {$POP}
  129.  
  130. {$SETC UsingIncludes := DriverSupportIncludes}
  131.  
  132. {$ENDC} {__DRIVERSUPPORT__}
  133.  
  134. {$IFC NOT UsingIncludes}
  135.  END.
  136. {$ENDC}
  137.